If this is not a DIR in my what could it be? Trying to access a file - directory

What could id.json be? I'm trying to access/or inspect the file.
Directory of C:\Users\ssand\.config\solana
02/09/2022 12:42 PM <DIR> .
02/09/2022 12:42 PM <DIR> ..
02/09/2022 11:05 AM <DIR> cli
02/09/2022 12:42 PM 239 id.json
02/09/2022 10:50 AM <DIR> install
1 File(s) 239 bytes
4 Dir(s) 7,804,948,480 bytes free

It is a file, not a directory. Files don't have <DIR> written near them, but have their size.
From the name, it seems like a JSON file. These files can be opened as text.

Related

Remove ~$filename.docx files from directory on unix machine

I am trying to delete the following files from a directory of my unix machine:
$ ls -la
total 160
... other files ...
-rw-r--r--# 1 username staff 171 Oct 24 2017 ~$checklist.xlsx
-rw-r--r--# 1 username staff 171 Oct 16 2017 ~$papers.xlsx
-rw-r--r--# 1 username staff 162 Sep 4 2017 ~$rec.docx
-rw-r--r--# 1 username staff 162 Nov 25 21:00 ~$file1.docx
-rw-r--r--# 1 username staff 162 Nov 25 21:01 ~$file2.docx
However, when I attempt to delete them, it won't let me for various reasons. For example:
$ rm ~$checklist.xlsx
rm: ~.xlsx: No such file or directory
$ rm $checklist.xlsx
rm: .xlsx: No such file or directory
$ rm checklist.xlsx
rm: checklist.xlsx: No such file or directory
Why won't my computer let me delete these files? How can I go about deleting them? Thanks!
you need to scape those characters
a simple way to create one:
echo "fileteste" > \~\$file
a simple way to delete one:
rm \~\$file

mariabackup: empty backup file

I'm trying to automate our backups of some mysql databases in MariaDB Server 10.2.15 on CentOS 7.5:
mariabackup --backup --target-dir=/srv/db_backup --databases="wordpress" --xbstream | \
openssl enc -aes-256-cbc -k mysecretpassword > \
$(date +"%Y%m%d%H").backup.xb.enc
What I expect is a file in /srv/db_backup called $(date +"%Y%m%d%H").backup.xb.enc
What I'm finding is a file called $(date +"%Y%m%d%H").backup.xb.enc in my home directory with file size 0, and the /srv/db_backup dir looks like:
[root#wordpressdb1 ~]# ls -la /srv/db_backup/
total 77868
-rw------- 1 root root 16384 Jul 31 14:30 aria_log.00000001
-rw------- 1 root root 52 Jul 31 14:30 aria_log_control
-rw------- 1 root root 298 Jul 31 14:30 backup-my.cnf
-rw------- 1 root root 938 Jul 31 14:30 ib_buffer_pool
-rw------- 1 root root 79691776 Jul 31 14:30 ibdata1
-rw------- 1 root root 2560 Jul 31 14:30 ib_logfile0
drwx------ 2 root root 19 Jul 31 14:30 wordpress
-rw------- 1 root root 103 Jul 31 14:30 xtrabackup_checkpoints
-rw------- 1 root root 458 Jul 31 14:30 xtrabackup_info
All further attempts to run the mariabackup command fail on:
mariabackup: Can't create/write to file '/srv/db_backup/ib_logfile0' \
(Errcode: 17 "File exists")
mariabackup: error: failed to open the target stream for 'ib_logfile0'.
What have I done wrong?
EDIT
First error was a missing dash in openssl -aes-256-cbc
Now I'm seeing this:
180731 15:18:37 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
Error: failed to execute query FLUSH NO_WRITE_TO_BINLOG TABLES: Access \
denied; you need (at least one of) the RELOAD privilege(s) for this operation
I've granted both SUPER and RELOAD to root user, still get this error.
Partial answer:
"What I expect is a file in /srv/db_backup called $(date +"%Y%m%d%H").backup.xb.enc" -- Then you need to specify a directory other than the current directory:
mariadbdump ... > \
/srv/db_backup/$(date +"%Y%m%d%H").backup.xb.enc
As for "unable to write", what do you get from
ls -ld /srv/db_backup
You need to use --stream=xbstream , not --xbstream
You backed up into directory, not into stream.

Unable to extract tar file - tar: extract not authorized

I am working on Solaris 10 machine. In that i cannot able to untar my file. Logs are given below. Anyone please suggest what may be the issue? I can able to create tar file but unable to untar. :(
bash-3.2# ls -lrth ConfigCheck-120614-KL.out*
-rw-r--r-- 1 root root 144K Jun 12 17:15 ConfigCheck-120614-KL.out
-rwxrwxrwx 1 root root 146K Jun 16 16:49 ConfigCheck-120614-KL.out.tar
bash-3.2# tar xvf ConfigCheck-120614-KL.out.tar
tar: extract not authorized
bash-3.2# tar tvf ConfigCheck-120614-KL.out.tar
-rw-r--r-- 0/0 147377 Jun 12 17:15 2014 ConfigCheck-120614-KL.out
Solaris 11 tar will fail with that error message if you are running as uid 0 but do not have the Media Restore profile set up in the RBAC configuration.
Unless you're trying to restore from backup, you should normally be untarring files as a normal user, not root, to avoid accidentally overwriting critical system files.

compile Qt with qmake and make

I need help about Qt files compiling with cmd. I chose the directory but I still have error about "qmake" and "make" commands.
I cant qmake or make . I am showing the cmd directories. but I cant compile it. which directory I need to use???
C:\Users\foo>dir
Volume in drive C has no label.
Volume Serial Number is F224-008C
Directory of C:\Users\foo
18.07.2013 09:42 <DIR> .
18.07.2013 09:42 <DIR> ..
17.07.2013 12:27 <DIR> ipch
17.07.2013 16:41 <DIR> QtTab
18.07.2013 09:42 21.450.752 QtTab.sdf
11.07.2013 11:17 882 QtTab.sln
11.07.2013 11:22 <DIR> Win32
2 File(s) 21.451.634 bytes
5 Dir(s) 103.678.271.488 bytes free
C:\Users\foo>qmake
'qmake' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\foo>make
'make' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\foo>cd qttab
C:\Users\foo>dir
Volume in drive C has no label.
Volume Serial Number is F224-008C
Directory of C:\Users\foo
17.07.2013 16:41 <DIR> .
17.07.2013 16:41 <DIR> ..
17.07.2013 16:42 <DIR> Debug
17.07.2013 16:41 <DIR> GeneratedFiles
17.07.2013 16:41 308 main.cpp
11.07.2013 11:17 130 qttab.cpp
11.07.2013 11:17 254 qttab.h
11.07.2013 11:17 65 qttab.qrc
17.07.2013 16:41 1.353 qttab.ui
11.07.2013 11:17 10.830 QtTab.vcxproj
11.07.2013 11:17 2.659 QtTab.vcxproj.filters
11.07.2013 11:22 609 QtTab.vcxproj.user
11.07.2013 11:17 <DIR> Resources
17.07.2013 12:28 1.994 foo.ui
9 File(s) 18.202 bytes
5 Dir(s) 103.678.271.488 bytes free
C:\Users\foo>qmake
'qmake' is not recognized as an internal or external command,
operable program or batch file.
Since you're using windows it seems you should use nmake, not make - see
qt documentation on compilation under windows
Expand your PATH System variable to include the QT-InstallationDir/bin (this is where qmake is) and run the vcvars.bat file from your MSVC2010 Installation Directory in your cmd prior to starting compiling (alternate use the cmd shortcut provided in your startmenu in the folder of MSVC)

Listing JAR within WAR

jar -tvf hello.war
However, my .war also contains some .jar in a lib folder within the .war.
I need a command display the contents of all the .jars within the .war.
The reason I need command line and not use tools like Winrar is because I need to incorporate it in my UNIX shell script.
You can do this with a short script.
TEMPDIR=`mktemp -d`
REALPATH=`pwd`/$1
(cd $TEMPDIR && jar xf $REALPATH)
for j in `find $TEMPDIR -name "*.jar"`; do echo `basename $j`; jar tvf $j; done
rm -rf $TEMPDIR
E.G.
$ ./go.sh x.war
z.jar
0 Sat Jul 30 21:53:20 EST 2011 META-INF/
71 Sat Jul 30 21:53:20 EST 2011 META-INF/MANIFEST.MF
182 Sat Jul 30 21:52:54 EST 2011 go.sh
25 Sat Jul 30 21:50:46 EST 2011 zz.sh
x.jar
0 Sat Jul 30 21:33:28 EST 2011 META-INF/
71 Sat Jul 30 21:33:28 EST 2011 META-INF/MANIFEST.MF
0 Sat Jul 30 21:33:20 EST 2011 x
Not really useful in a shell script, but the easiest way I've found to do this when looking at webapps interactively is to open them in emacs; archive mode understands jars, and just needs to be told about .wars, by adding
(add-to-list 'auto-mode-alist '("\\.war\\'" . archive-mode)) to your .emacs. Then you can open the war like a normal directory, plus anything insde it:

Resources