2

If I type "touch test" on run dialog it does not create any file on my home folder, so I was wondering where these files are created since I can do some dangerous things like fallocate or dd some really big files that I will not find later.

Borwan
  • 21
  • 1

1 Answers1

0

For me, touch test creates a file test in my home directory.

Running pwd > /tmp/gnomepwd.txt does not generate a file. The run dialog is not your shell. It just sees pwd, > and /tmp/gnomepwd.txt, runs pwd and passes the two other strings as arguments. pwd does not take arguments, only options, so happily prints the current directory to nowhere.

Running sh -c "pwd > /tmp/gnomepwd.txt" will start a shell, which will interpret the command pwd and > as the redirection symbol. This time, you will find the output in a file, the current folder of Gnome Shell, which is the home folder of the current user.

To do "dangerous things", you need to be root, so precede your command with su or sudo. If you do dangerous things, it is wise to know exactly what you will be doing by specifying an absolute path instead of a relative path. Anyway, better is not to use the Alt+F2 prompt for administrator tasks. Prefer then to act as a pro and open a terminal instead.

vanadium
  • 101
  • 1