How do you make a new directory? - directory

I'm trying to create a new directory. I'm using mkdir, but for some reason it isn't working.
Are there any other ways to make directories I don't know?
Thanks in advance!

Please be more specific, if you mean creating a new directory in CMD the correct syntax is: MKDIR dir_name
i.e:
C:\Users\Thunder>mkdir new_directory
C:\Users\Thunder>dir
04/12/2020 17:50 <DIR> Music
08/12/2020 19:52 <DIR> MyFirstGame
***22/12/2020 16:05 <DIR> new_directory***
24/10/2020 16:11 <DIR> Nox_share
24/10/2020 16:10 45 nuuid.ini
Be sure you have correct access, just in case run CMD as administrator.

Related

I'm unable to delete this folder

Okay, I recently installed snapd on my system, but I later decided to uninstall it. Regardless of me uninstalling it, the folder, /snap/, remains. I initially tried to delete the folder using the
sudo rm -r snap
command, but I keep getting the error message that the folder is a read-only folder. I did the
ls -ld snap
command to see the permissions for that folder and the output I got was
drwxr-xr-x 1 root root 370 Jan 24 19:02 snap
Would anyone be so kind as to tell me how I would go about deleting that folder? Thanks.

Navigating directories when you don't know the name of the directory

I have a directory that is created through an external process. The directory is named 2021-12-08_1345 (YYYY-MM-DD_HHMM) based on the date and time when the process is executed. While this is the only directory in the path, I won't know the precise name of the directory. Is there a way to navigate to this folder knowing that it's the first and only directory?
The solution is cd $(ls -d -1 */ |sed -n '1p') where 1p is the nth directory that you want to navigate to. I came across the solution on an Ubuntu StackExchange https://askubuntu.com/questions/454688/how-do-you-cd-into-the-first-available-folder-without-typing-out-the-name#comment1800653_455113
I verified that this works on macOS 11.5.2+
If you are sure it is the only directory you can use
cd */
or
cd /path/to/*/
but this will fail if there is more than one directory.
Otherwise I suggest to use the solution from Ed Knittel's answer.
If you know that there is only one directory and no files you can even omit the trailing / from these commands, e.g. cd *.

Inaccessible folder when using Google Drive via terminal

I access my Google Drive via the terminal using gdfuse. There is a directory that exists, but I can't seem to access via the terminal:
I have a directory called 'papers'. Within that I want to access 'instructions'. When I do ls -ltr I see:
?????????? ? ? ? ? ? instructions
drwxrwxr-x 2 user user 4096 Jun 12 2017 my_docs
-rw-rw-r-- 1 user user 3923 Jul 25 2017 bs237-procedure.txt
with the word instructions appearing in red. And if I try to cd instructions I am told bash: cd: instructions: No such file or directory.
However if I use a browser to go into my Google Drive, I can access the directory 'instructions' and the files within it no problem.
I was searching and I reached this answer, hope it works for you!
To read a file, its read permission needs to be set. However, to read a directory and the listing of its files, both the read and the execute permissions need to be set. If they aren't, you get weird errors like the ones you're experiencing.
To set the read permission on files and the read and execute permissions on directories recursively, use this command:
chmod -R a+rX directoryname
and link to that page: https://askubuntu.com/questions/243999/why-do-question-mark-characters-appear-when-changing-the-permissions-of-director
edit : you can change the folder name, again I saw this on the internet and it seems to work!

user in the proper group cannot copy files to a "drw-rwS---" dir

This makes no sense to me: usr2 belongs to grpX, the directory is configured as bellow, so why can't usr2 copy his files to my folder? Is it because his files have different access settings? How can I chmod things so that this is never an issue (I want the files to inherit from my directory config)?
drw-rwS--- 2 usr1 grpX 4096 25 jun 18.28 data

How to build static libqsqlpsql.so in Qt in Ubuntu

friend!
Please, help me. I am confused and sad. Darkness is embracing me and you, my friends, are the only hope I have.
I have installed qt in Ubuntu 10.10 using aptitude.
Then I have installed libqt4-sql-psql. Now I have *.so files in qt's directory /usr/lib/qt4/plugins/sqldrivers.
Directory contains now 3 files actually.
$ ls -l
-rw-r--r-- 1 root root 47048 2011-03-29 12:11 libqsqlite.so
-rw-r--r-- 1 root root 63668 2011-03-29 12:11 libqsqlmysql.so
-rw-r--r-- 1 root root 71844 2011-03-29 12:11 libqsqlpsql.so
There is no psql.pro or anything I can use to qmake this all.
How can I build driver and use to work with postgres.
What should I do?
Maybe it is a dummy's question... sorry
You have the file you need:
/usr/lib/qt4/plugins/sqldrivers/libqsqlpsql.so
this should allow you to use the driver. You can check which drivers are available using QSqlDatabase::drivers.

Resources